package com.jtlrm.ckd.entity;

import android.os.Parcel;
import android.os.Parcelable;

import com.jtlrm.ckd.config.UrlConstants;

import java.io.Serializable;

public class GroupMemberEntity implements Parcelable {
    private String id;

    private String easemobId;

    private int role;

    private String headPicture;

    private String name;

    protected GroupMemberEntity(Parcel in) {
        id = in.readString();
        easemobId = in.readString();
        role = in.readInt();
        headPicture = in.readString();
        name = in.readString();
    }

    public static final Creator<GroupMemberEntity> CREATOR = new Creator<GroupMemberEntity>() {
        @Override
        public GroupMemberEntity createFromParcel(Parcel in) {
            return new GroupMemberEntity(in);
        }

        @Override
        public GroupMemberEntity[] newArray(int size) {
            return new GroupMemberEntity[size];
        }
    };

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getEasemobId() {
        return easemobId;
    }

    public void setEasemobId(String easemobId) {
        this.easemobId = easemobId;
    }

    public int getRole() {
        return role;
    }

    public void setRole(int role) {
        this.role = role;
    }

    public String getHeadPicture() {
        return UrlConstants.IMAGE_URL + headPicture;
    }

    public void setHeadPicture(String headPicture) {
        this.headPicture = headPicture;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(easemobId);
        dest.writeInt(role);
        dest.writeString(headPicture);
        dest.writeString(name);
    }
}
